import 'package:flutter/material.dart';

class ButtonCounter with ChangeNotifier {
  int value = 1;

  increment() {
    value++;
    notifyListeners();
  }

  sub() {
    if (value <= 1) {
      value = 1;
      notifyListeners();
    } else {
      value--;
      notifyListeners();
    }
  }
}
